package com.sms.gui.actions;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.JDialog;

public class CancelAction extends AbstractAction {

    private static final long serialVersionUID = 1L;
    JDialog dialog;

    public CancelAction(JDialog d) {
        super();
        dialog = d;
        putValue(AbstractAction.NAME, "Cancel");
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        dialog.dispose();
    }
}
